//
//  VehicleModel.swift
//  koolcar
//
//  Created by kuaimaxiansheng on 2023/10/11.
//

import UIKit
import ObjectMapper
class VehicleModel: Mappable {
    var code: String?
    var msg: String?
    var data: [VehicleLisetModel]?
    func mapping(map: Map) {
        code <- map["code"]
        msg <- map["msg"]
        data <- map["data"]
    }
    required init?(map: Map) {
        
    }
}

class VehicleDataModel: Mappable {
    var page: [VehicleLisetModel]?
    var content: [VehicleLisetModel]?
    func mapping(map: Map) {
        content <- map["content"]
        page <- map["page"]
    }
    required init?(map: Map) {
        
    }
}


class VehicleLisetModel: Mappable {
    
    var favoriteBlock: (()->Void)?//是否收藏
    
    var id: NSInteger?
    var backgroundImage: String?
    var name: String?
    var price: Double?
    var orderPrice: Double?
    var isSpecial: Bool?
    var originalPrice: Double?
    var appearanceImages: String?
    var interiorImages: String?
    var engineChassisImages: String?
    var videoUrl: String?
    var favorite: Bool?//是否收藏
    var statusStr: String?
    
    
    //商城
    var categoryName: String?//分类名称
    var discountPrice: Double?//折扣价
    var isDiscount: NSInteger?//1：折扣，2：非折扣
    var isFavorite: Bool?//是否收藏
    var isHot: Bool?//是否热门
    var isLimitedTime: Bool?//是否限时
    var isSellOut: Bool?//是否售出
    var mutipleSkuFlag: NSInteger?
    var productImage: String?
    var memberPrice: Double?////会员价
    var skuDTOList: [SkuDTOListModel]?
    
    //限时抢购
 
    var isShelf: Bool?
    var promotionPrice: Double?
    var skuId: NSInteger?
    var availableStock: NSInteger?
    
    
    func mapping(map: Map) {
        skuDTOList <- map["skuDTOList"]
        id <- map["id"]
        backgroundImage <- map["backgroundImage"]
        name <- map["name"]
        price <- map["price"]
        backgroundImage <- map["backgroundImage"]
        orderPrice <- map["orderPrice"]
        isSpecial <- map["isSpecial"]
        originalPrice <- map["originalPrice"]
        appearanceImages <- map["appearanceImages"]
        interiorImages <- map["interiorImages"]
        engineChassisImages <- map["engineChassisImages"]
        videoUrl <- map["videoUrl"]
        favorite <- map["favorite"]
        statusStr <- map["statusStr"]
        
        
        categoryName <- map["categoryName"]
        discountPrice <- map["discountPrice"]
        isDiscount <- map["isDiscount"]
        isFavorite <- map["isFavorite"]
        isHot <- map["isHot"]
        isLimitedTime <- map["isLimitedTime"]
        isSellOut <- map["isSellOut"]
        mutipleSkuFlag <- map["mutipleSkuFlag"]
        productImage <- map["productImage"]
        memberPrice <- map["memberPrice"]
        
        
        isShelf  <- map["isShelf"]
        promotionPrice  <- map["promotionPrice"]
        skuId <- map["skuId"]
        availableStock <- map["availableStock"]
        
        
    }
    required init?(map: Map) {
        
    }
    
    init() {
        
    }
}
